package com.uuah.server.config.spring.parsers.collection;

import com.uuah.server.config.spring.parsers.generic.ChildDefinitionParser;

public class ChildMapEntryDefinitionParser extends ChildDefinitionParser {

	public static final String KEY = "key";
	public static final String VALUE = "value";

	public ChildMapEntryDefinitionParser(String mapName) {
		super(mapName, KeyValuePair.class);
	}

	public ChildMapEntryDefinitionParser(String mapName, String keyName,
			String valueName) {
		this(mapName);
		addAlias(keyName, KEY);
		addAlias(valueName, VALUE);
	}

	public static class KeyValuePair {
		private String key;
		private Object value;

		public KeyValuePair() {
			super();
		}

		public KeyValuePair(String key, Object value) {
			this.key = key;
			this.value = value;
		}

		public String getKey() {
			return key;
		}

		public Object getValue() {
			return value;
		}

		public void setKey(String key) {
			this.key = key;
		}

		public void setValue(Object value) {
			this.value = value;
		}

	}
}
